/*
 * @Author: Wanghuahuaa 1561504951@qq.com
 * @Date: 2024-09-26 15:19:19
 * @LastEditors: Wanghuahuaa
 * @LastEditTime: 2024-10-22 19:08:53
 * @Description:
 */
import { customOptions, request } from "@/common/useAxios";
import defaultGcfxConfig from "@/gcfx_web/defaultConfig";
import { IGCFX_WEB_CONFIG } from "@/gcfx_web/defaultConfig/config.d";
import { REQUEST_TIMEOUT, SYSTEM_IDENTIFIERS } from "@/gcfx_web/defaultConfig/const";
import fileUtils, { fileVisitBaseURL } from "./fileUtils";
import useCaseEngineerQueryPage from "./usePage/useCaseEngineerQueryPage";
import useEngineeringIndicatorPage from "./usePage/useEngineeringIndicatorPage";
import useIndicatorsDictionary from "./usePage/useIndicatorsDictionary";
import useListUnitPriceQueryPage from "./usePage/useListUnitPriceQueryPage";
import useMaterialPriceQueryPage from "./usePage/useMaterialPriceQueryPage";
import useProCheckPage from "./usePage/useProCheckPage";
import useProComparePage from "./usePage/useProComparePage";
import useProUpload from "./usePage/useProUpload";
import useTemplateMaintainPage from "./usePage/useTemplateMaintainPage";

const get = (url: string, params: any = {}, options?: customOptions) =>
  request(url, params, "get", {
    ...options,
    timeout: REQUEST_TIMEOUT,
    // baseURL: SYSTEM_GLOBAL.noGateWaybaseURL + "api/",
  });
const post = (url: string, params: any = {}, options?: customOptions) =>
  request(url, params, "post", {
    ...options,
    timeout: REQUEST_TIMEOUT,
    // baseURL: SYSTEM_GLOBAL.noGateWaybaseURL + "api/",
  });

// gcfx_web 相关配置
const GCFX_WEB_CONFIG: IGCFX_WEB_CONFIG = {
  ...defaultGcfxConfig,

  SYSTEM_IDENTIFIER: SYSTEM_IDENTIFIERS.CPDSJ,

  get,
  post,

  fileBaseURL: SYSTEM_GLOBAL.fileBaseURL,
  // fileVisitBaseURL: SYSTEM_GLOBAL.fileBaseURL,
  fileVisitBaseURL: fileVisitBaseURL,
  // downloadFile: ,

  useCaseEngineerQueryPage: useCaseEngineerQueryPage,
  useListUnitPriceQueryPage: useListUnitPriceQueryPage,
  useMaterialPriceQueryPage: useMaterialPriceQueryPage,
  useIndicatorsDictionary: useIndicatorsDictionary,
  useTemplateMaintainPage: useTemplateMaintainPage,

  useEngineeringIndicatorPage: useEngineeringIndicatorPage,
  useProComparePage: useProComparePage,
  useProCheckPage: useProCheckPage,

  useProUpload: useProUpload,

  ...fileUtils,

  // projectOverviewComponent: ProjectOverview, //工程内页项目概况组件

  // CustomProViewTabs: [{ label: "附件", key: "enclosure", TabChildren: Enclosure }],

  tableProps: {
    bordered: true,
    fullHeight: false,
  },
};

export default GCFX_WEB_CONFIG;
